import request from '@/utils/request'
// 查询试题分类列表
export function typeTree(query) {
  return request({
    url: '/formcfg/form/type/tree',
    method: 'get',
    params: query
  })
}

// 添加量表
export function formcfgAdd(data) {
    return request({
      url: '/formcfg/form',
      method: 'post',
      data: data
    })
  }

  // 修改试题
export function formcfgPut(data) {
    return request({
      url: '/formcfg/form',
      method: 'put',
      data: data
    })
  }
  // 获取试题
  export function formcfgList(query) {
    return request({
      url: '/formcfg/form/page',
      method: 'get',
      params: query
    })
  }

    // 量表详情
export function scaleDtail(id) {
    return request({
      url: '/formcfg/form/'+ id,
      method: 'get'
    })
  }

  // 删除量表
export function formcfgDel(userIds) {
  return request({
    url: '/formcfg/form/'+ userIds,
    method: 'delete'
  })
}

// 修改量表状态
export function formcfgStatus(data) {
  return request({
    url: '/formcfg/form/change/status',
    method: 'post',
    data: data
  })
}

// 发起测评
export function settingSaveOrUpdate(data) {
  return request({
    url: '/formcfg/form/setting/saveOrUpdate',
    method: 'post',
    data: data
  })
}

  // 测评详情
  export function formSetting(query) {
    return request({
      url: '/formcfg/form/setting',
      method: 'get',
      params: query
    })
  }

  // 删除测评
  export function formSettingDel(Id) {
    return request({
      url: '/formcfg/form/setting/'+ Id,
      method: 'delete'
    })
  }
  
  // 修改测评状态
export function settingChangeStatus(data) {
  return request({
    url: '/formcfg/form/setting/change/status',
    method: 'post',
    data: data
  })
}
  
  // 添加模型
  export function formcfgModel(data) {
    return request({
      url: '/formcfg/form/model',
      method: 'post',
      data: data
    })
  }
    // 修改模型
    export function putModel(data) {
      return request({
        url: '/formcfg/form/model',
        method: 'put',
        data: data
      })
    }
    //模型列表
    export function modelPage(query) {
      return request({
        url: '/formcfg/form/model/page',
        method: 'get',
        params: query
      })
    }

      // 删除模型
  export function fmodelDel(Id) {
    return request({
      url: '/formcfg/form/model/'+ Id,
      method: 'delete'
    })
  }
  
  // 添加试题库
  export function questionSave(data) {
    return request({
      url: '/formcfg/form/question/save',
      method: 'post',
      data: data
    })
  }
      //试题列表
      export function questionPage(query) {
        return request({
          url: '/formcfg/form/question/page',
          method: 'get',
          params: query
        })
      }
  
          // 试题详情
export function questionDtail(id) {
  return request({
    url: '/formcfg/form/question/detail/'+ id,
    method: 'get'
  })
}

// 修改试题
export function questionPut(data) {
  return request({
    url: '/formcfg/form/question/update',
    method: 'put',
    data: data
  })
}


      // 删除试题
      export function questionDel(Id) {
        return request({
          url: '/formcfg/form/question/'+ Id,
          method: 'delete'
        })
      }

                // 试题下拉
export function dropDownBox() {
  return request({
    url: '/formcfg/form/question/drop-down-box',
    method: 'get'
  })
}
      